var max = 1000;
var pointSet = [];
var distance = [
	[0, 4, 7 , max, max],
	[4, 0, 8, 6, max],
	[7, 8, 0, 5, max],
	[max, 6, 5, 0, 7],
	[max, max, max, 7, 0]
];

function Node(value) {
	this.value = value;
	this.neighbor = []
}

var a = new Node("A");
var b = new Node("B");
var c = new Node("C");
var d = new Node("D");
var e = new Node("E");

pointSet.push(a);
pointSet.push(b);
pointSet.push(c);
pointSet.push(d);
pointSet.push(e);

function getIndex(str) {

}

//需要传入  点的集合  边的集合  已经接入点的集合
//根据当前已有的节点， 来判断 获取到距离最短的点
function getMinDistance(pointSet, distance, nowPointSet) {
	var fromNode = null;  //线段的起点
	var minDisNode = null;      //线段的终点
	var minDis = max;
	//根据当前已有的点为起点， 依次判断链接其他的点的距离是多少


}

function prim(pointSet, distance, start) {
	var nowPointSet = [];
	nowPointSet.push(start);
}

prim(pointSet, distance, pointSet[2])